package com.wan37.logic.domain.vo;

import com.wan37.protobuf.constant.CommonBase;
import com.wan37.logic.domain.entity.RoleDO;
import com.wan37.protobuf.constant.AllRoleLabel;

/**
 * @author : luoyong
 * @date : 2020-06-15 17:10
 **/
public class RoleVO extends AllRoleVO {

    private String userId;
    private Integer level;
    private String profession;

    public RoleVO() {
    }

    public RoleVO(RoleDO roleDO) {
        setAllRoleId(roleDO.getRoleId());
        setName(roleDO.getNickname());
        getNumberMap().put(CommonBase.MP, roleDO.getMP());
        getNumberMap().put(CommonBase.HP, roleDO.getHP());
        this.userId = roleDO.getUserId();
        this.level = roleDO.getLevel();
        setStatus(roleDO.getStatus());
        setLabel(AllRoleLabel.ROLE);
        this.profession = roleDO.getProfession();
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public Integer getLevel() {
        return level;
    }

    public void setLevel(Integer level) {
        this.level = level;
    }

    public String getProfession() {
        return profession;
    }

    public void setProfession(String profession) {
        this.profession = profession;
    }

    @Override
    public String toString() {
        return "RoleVO{" +
                "userId='" + userId + '\'' +
                ", level=" + level +
                '}';
    }
}
